package domain;

import java.util.Date;
import java.util.Objects;
import java.util.Vector;

/**
 * 社团活动类
 *
 * @author liujiale
 */
public class Activity {
    /** 活动ID */
    private int activityID;

    /** 活动名称 */
    private String activityName;

    /** 活动描述 */
    private String description;

    /** 开始时间 */
    private Date startTime;

    /** 结束时间 */
    private Date endTime;

    /** 活动地点 */
    private String place;

    /** 参与者列表 */
    private Vector<User> participantList;

    /** 组织者列表 */
    private Vector<ClubAdministrator> organizerList;


    /**
     * 空构造函数
     */
    public Activity() {
    }

    /**
     * 构造函数
     *
     * @param activityID      活动ID
     * @param description     活动描述
     * @param startTime       开始时间
     * @param endTime         结束时间
     * @param place           活动举办地点
     * @param participantList 活动参加者列表
     * @param organizerList   活动举办者列表
     */
    public Activity(int activityID, String description, Date startTime, Date endTime, String place, Vector<User> participantList, Vector<ClubAdministrator> organizerList) {
        this.activityID = activityID;
        this.description = description;
        this.startTime = startTime;
        this.endTime = endTime;
        this.place = place;
        this.participantList = participantList;
        this.organizerList = organizerList;
    }

    public Activity(int activityID, String activityName,String description, Date startTime, Date endTime, String place) {
        this.activityID = activityID;
        this.activityName=activityName;
        this.description = description;
        this.startTime = startTime;
        this.endTime = endTime;
        this.place = place;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    /**
     * Gets activity id.
     *
     * @return the activity id
     */
    public int getActivityID() {
        return activityID;
    }

    /**
     * Sets activity id.
     *
     * @param activityID the activity id
     */
    public void setActivityID(int activityID) {
        this.activityID = activityID;
    }

    /**
     * Gets description.
     *
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets description.
     *
     * @param description the description
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Gets start time.
     *
     * @return the start time
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     * Sets start time.
     *
     * @param startTime the start time
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * Gets end time.
     *
     * @return the end time
     */
    public Date getEndTime() {
        return endTime;
    }

    /**
     * Sets end time.
     *
     * @param endTime the end time
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     * Gets place.
     *
     * @return the place
     */
    public String getPlace() {
        return place;
    }

    /**
     * Sets place.
     *
     * @param place the place
     */
    public void setPlace(String place) {
        this.place = place;
    }

    /**
     * Gets participant list.
     *
     * @return the participant list
     */
    public Vector<User> getParticipantList() {
        return participantList;
    }

    /**
     * Sets participant list.
     *
     * @param participantList the participant list
     */
    public void setParticipantList(Vector<User> participantList) {
        this.participantList = participantList;
    }

    /**
     * Gets organizer list.
     *
     * @return the organizer list
     */
    public Vector<ClubAdministrator> getOrganizerList() {
        return organizerList;
    }

    /**
     * Sets organizer list.
     *
     * @param organizerList the organizer list
     */
    public void setOrganizerList(Vector<ClubAdministrator> organizerList) {
        this.organizerList = organizerList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof Activity)) {
            return false;
        }
        Activity activity = (Activity) o;
        return activityID == activity.activityID && Objects.equals(activityName, activity.activityName) && Objects.equals(description, activity.description) && Objects.equals(startTime, activity.startTime) && Objects.equals(endTime, activity.endTime) && Objects.equals(place, activity.place) && Objects.equals(participantList, activity.participantList) && Objects.equals(organizerList, activity.organizerList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(activityID, activityName, description, startTime, endTime, place, participantList, organizerList);
    }

    @Override
    public String toString() {
        return "Activity{" +
                "activityID=" + activityID +
                ", activityName='" + activityName + '\'' +
                ", description='" + description + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", place='" + place + '\'' +
                ", participantList=" + participantList +
                ", organizerList=" + organizerList +
                '}';
    }
}
